Back to networking

Pipeline, November/December 1995, vol.6, no.6
Copyright © 1995 Silicon Graphics


Configuring Multiple Network Interfaces on SGI Systems

In most cases, systems with one or two network interfaces can use the
default configuration specified by SGI. However, for those situations
where the defaults are not sufficient, this article provides
information to allow the system or network administrator to configure
the system properly.  Topics covered include:

In general, the information presented in this article is applicable to IRIX 4.0.x, IRIX 5.x and IRIX 6.x. However, IRIX 5.3 was used in researching this article.

Network Interface Defaults

The default network configuration information is located in the file /etc/init.d/network, while the site specific network configuration information is located in the files /etc/config/netif.options and /etc/config/ifconfig-<n>.options (where <n> is 1, 2, 3, etc., based on the interface variable name). Information in the file /etc/config/netif.options overrides the defaults specified in the file /etc/init.d/network. The following three sections describe the system defaults.

Number of Interfaces

By default, the network configuration script only configures two network interfaces, regardless of how many network interfaces exist on a system.

Naming Conventions

The interface name is the device name as reported by the command netstat(1). Refer to Table 1 for a list of valid interface names organized by CPU type.

For the primary interface, the interface address is the system hostname(1) as specified in the file /etc/sys_id(4). All other interfaces (with the exception of Token Ring) are of the form gate-$HOSTNAME. Token Ring interfaces are of the form tr-$HOSTNAME.

Interface Order

In the absence of an FDDI interface, the built-in network interface is the primary interface. If an FDDI interface exists, it is the primary interface. The ordering of the other interfaces is determined by the script /etc/init.d/network. (To find the appropriate section, search for the string "2 interfaces" in the script /etc/init.d/network.)

Modifying the Defaults

There are several reasons why a network or system administrator might want to modify the SGI network defaults:

As stated previously, if a system has more than two network interfaces, the third and subsequent interfaces are not configured by the system. If a system has more than two network interfaces, the system or network administrator must modify the SGI network defaults.

The system hostname is the default address for the primary interface, and gate-$HOSTNAME is the default address for the secondary interface. Often, defining a prefix to identify the network that the system resides on may provide more useful information for the system or network administrator.

The script /etc/init.d/network defines the network interfaces that are primary and secondary. Depending on factors such as how the network is configured, the speed (and reliability) of the interface, and how many systems reside on a network, the defaults may not be appropriate.

An Example

This section describes how to configure a system with three interfaces that are each on a different network.

This example assumes that the system is a CHALLENGE (CPU type IP19) that has one VME EFAST interface (fxp0) and one VME FDDI interface (ipg0) in addition to its built-in network interface (et0). The three networks that this system reside on are called: engr, lab1, and lab2.

The primary network interface is FDDI (the default). This makes sense in this example for several reasons. The engr network has more systems than either of the lab nets, and is a production network. Because FDDI is faster than either of the other two interfaces, it is better able to handle the traffic of the large and busy engr network.

Of the two lab networks, lab1 is set up to test new systems and uses the VME EFAST interface. The built-in network interface is used for the lab2 network.

	(Figure not available in ASCII)
Figure 1. Engr, lab1 and lab2 Network Topology

Configuring the Interface Name

The file /etc/config/netif.options specifies the interface name for each network interface in the system. The interface name variable designates the order (first, second, third, etc.), as well as the type of interface (built-in Ethernet, VME FDDI, etc.).

The scripts /etc/config/netif.options and /etc/init.d/network use the variable names if1name and if1addr for the primary interface, if2name and if2addr for the second interface, etc.

The interface device name for each if<n>name variable (where <n> is 1, 2, 3 etc.) can be determined by the netstat command. Refer to Table 1 for a list of valid interface names. Note that the loopback device lo0 is not a valid interface name in this context.

% /usr/etc/netstat -i | cut -f1 -d" "

Name 
fxp0 
ipg0 
et0 
lo0
In the example in this article, the interface names can be set by changing the following in the file /etc/config/netif.options.

Change this:

# The following shell variables have the form 
# "var=value", with no spaces  before or after 
# the = character (for example:  if1name=fxp1).  
# Lines with the leading : character are 
# commented out.
# Append the interface name and remove the 
# leading : to override  the primary interface 
# selection. 
: if1name=
# To override the primary interface address, 
# change the value part and remove the leading : 
# character.
: if1addr=$HOSTNAME
# To override the name and/or address of the 
# first gateway interface, change the value part 
# and remove the leading : character.
: if2name= 
: if2addr=gate-$HOSTNAME
# If this host has more than 2 interfaces, you 
# must define values for if3name (and if4name if 
# appropriate). Change if3addr (and if4addr) to 
# the appropriate names in /etc/hosts if your 
# site has different naming conventions.
if3name= 
if3addr=gate2-$HOSTNAME
to this:
# The following shell variables have the form 
# "var=value", with no spaces  before or after 
# the = character (for example:  if1name=fxp1).  
# Lines with the leading : character are 
# commented out.
# Append the interface name and remove the 
# leading : to override  the primary interface 
# selection. 
if1name=ipg0
# To override the primary interface address, 
# change the value part and remove the leading : 
# character.
: if1addr=$HOSTNAME
# To override the name and/or address of the 
# first gateway interface, change the value part 
# and remove the leading : character.
if2name=fxp0 
: if2addr=gate-$HOSTNAME
# If this host has more than 2 interfaces, you 
# must define values for if3name (and if4name if 
# appropriate). Change if3addr (and if4addr) to 
# the appropriate names in /etc/hosts if your 
# site has different naming conventions.
if3name=et0 
if3addr=gate2-$HOSTNAME

Configuring the Interface Address

In addition to specifying the interface name, the file /etc/config/netif.options also defines the interface address in the variable if<n>addr (where <n> is 1, 2, 3 etc.). The interface address can be $HOSTNAME (with the variable set to the name in the file /etc/sys_id), a valid hostname (or alias) in the file /etc/hosts, or an IP address in dot notation. By convention, interface names other than the primary interface have a prefix of gate-. In this example, the prefix is changed to the name of the network (engr-, lab1-, and lab2-). To ensure that the system boots correctly, the IP address or hostname must exist in the file /etc/hosts. It is a good idea to use a hostname rather than an IP address in the file /etc/config/netif.options so that maintenance of IP addresses is limited to the /etc/hosts file. If an IP address changes for an interface, the /etc/hosts file is the only location that needs to be modified.

Continuing the example above, change this:

# The following shell variables have the form 
# "var=value", with no spaces  before or after 
# the = character (for example:  if1name=fxp1).  
# Lines with the leading : character are 
# commented out.
# Append the interface name and remove the 
# leading : to override  the primary interface 
# selection. 
if1name=ipg0
# To override the primary interface address, 
# change the value part and remove the leading : 
# character.
: if1addr=$HOSTNAME
# To override the name and/or address of the 
# first gateway interface, change the value part 
# and remove the leading : character.
if2name=fxp0 
: if2addr=gate-$HOSTNAME
# If this host has more than 2 interfaces, you 
# must define values for if3name (and if4name if 
# appropriate). Change if3addr (and if4addr) to 
# the appropriate names in /etc/hosts if your 
# site has different naming conventions.
if3name=et0 
if3addr=gate2-$HOSTNAME
to this:
# The following shell variables have the form 
# "var=value", with no spaces  before or after 
# the = character (for example:  if1name=fxp1).  
# Lines with the leading : character are 
# commented out.
# Append the interface name and remove the 
# leading : to override  the primary interface 
# selection. 
if1name=ipg0
# To override the primary interface address, 
# change the value part and remove the leading : 
# character.
if1addr=engr-$HOSTNAME
# To override the name and/or address of the 
# first gateway interface, change the value part 
# and remove the leading : character.
if2name=fxp0 
if2addr=lab1-$HOSTNAME
# If this host has more than 2 interfaces, you 
# must define values for if3name (and if4name if 
# appropriate). Change if3addr (and if4addr) to 
# the appropriate names in /etc/hosts if your 
# site has different naming conventions.
if3name=et0 
if3addr=lab2-$HOSTNAME

Configuring the Interface Parameters

Network parameters are those settings that determine how an interface processes or supplies certain network information. Modifying network parameters requires the system or network administrator to create or modify the appropriate /etc/config/ifconfig-<n>.options file (where <n> is 1, 2, 3, etc., based on the interface variable name).


WARNING
The default parameter settings are apropriate for most sites. Changing these settings can cause a network to become inoperative. Care should be taken when considering any modifications to these parameters.

There are four parameters that can be set in the file /etc/config/ifconfig-<n>.options:

Refer to the manual page for ifconfig(1M) and chapters 3 and 4, "Setting up" and "Managing a Network" in the IRIX Admin: Networking and Mail Manual (available on-line with InSight(1)) for more information on these parameters.

To modify any default parameter for an interface, create or modify the corresponding /etc/config/ifconfig-<n>.options file and add the desired entry or entries. Entries may be specified on multiple lines for clarity or on a single line.

To change the network mask value for a network interface, enter a line with the word netmask followed by a space and either the 32-bit hexadecimal value, the internet address dot-notation, or the network name (refer to the networks(4) manual page for more information). In the example above, if the engr network has an interface address of 189.92.6.1, and requires a Class C subnet mask of 0xffffff00, the network administrator needs to modify the file /etc/config/ifconfig-1.options (or create this file) to include the following line:

netmask 0xffffff00
To change the netmask and also disable the Address Resolution Protocol (ARP) on the second interface, the lab1 interface, change /etc/config/ifconfig-2.options:
netmask 0xffffff00 -arp
To change the broadcast address for a network interface, enter the word broadcast followed by a space and the dotted decimal Internet Protocol broadcast address.

Note that it is almost always an error to change only the broadcast without changing the netmask. The netmask is used to identify the host portion of the address, while the broadcast address is used to identify all hosts on the particular network. Incorrectly setting the broadcast can cause the system to be unable to communicate with any hosts on the network. In addition, an incorrectly configured broadcast address can cause NIS (Network Information Services) to fail to bind to a server, which can in turn prevent users from logging in and other system services from working properly.

To change the routing metric count for a network interface, enter the word metric followed by a space and the count. The default metric count, also called hops, is 0. The routed(1M) daemon monitors the number of hops required to route data from one network to another. To make a route less favorable, increase the metric count on the particular interface. Refer to the routed(1M) manual page for more information.

On the third interface (the lab2 network), if the network administrator wants to disable ARP, use a Class B network subnetted to use 8 bits of the IP address for the subnet, use 0 as the broadcast address instead of the default 1, and use a metric of 4, the file /etc/config/ifconfig-3.options can be modified (or created) to contain the following:

netmask 255.255.255.0 broadcast 129.38.50.0 -arp
metric 4
SGI does not support multiple network interfaces from a single system connected to the same physical network. IRIX does not support "load balancing" between multiple interfaces.

Network Interface Names on SGI Systems

Table 1 lists the network interfaces available on IRIS systems. Depending on the configuration of the system, it may not be possible to have the maximum number of interfaces.

-------------------------------------------------------------------------------
                      |    built-in        |           VME
-------------------------------------------------------------------------------
                      | IO2, IO3, |  on    | EFAST  | CMC    | FDDI | Token
                      | IO4       |  board | Ether. | Ether. |      | Ring
-------------------------------------------------------------------------------
System            CPU |  et       |   ec   |  fxp   |  enp   |  ipg | fv
-------------------------------------------------------------------------------
                  IP4 |           |        |  4     |  4     |  4   | 4
                  IP5 |  1        |        |  4     |  4     |  4   | 4
                  IP6 |           |   1    |        |  1     |  1   | 1
                  IP7 |  2        |        |  4     |  4     |  4   | 4
                  IP9 |  1        |        |  4     |  4     |  4   | 4
4D/30, 4D/35      IP12|           |   1    |        |  1     |  1   | 1
R3000 Indigo      IP12|           |   1    |        |        |      |
                  IP17|  1        |        |  4     |  4     |  4   | 4
                  IP19|  4        |        |  4     |  4     |  4   | 4
                  IP20|           |   1    |        |        |      |
                  IP21|  4        |        |  4     |  4     |  4   | 4
Indy              IP22|           |   1    |        |        |      |
CHALLENGE S       IP22|           |   1    |        |        |      |
CHALLENGE M       IP22|           |   1    |        |        |      |
Indigo2           IP22|           |   1    |        |        |      |
Power Indigo2     IP26|           |   1    |        |        |      |
Power CHALLENGE M IP26|           |   1    |        |        |      |

-------------------------------------------------------------------------------
                      |        GIO            |     HIO       |     EISA
-------------------------------------------------------------------------------
                      | FDDI | Token | E++    | FDDI* | HIPPI | E++    | Token
                      |      | Ring  | Ether. |       |       | Ether. | Ring
-------------------------------------------------------------------------------
System            CPU | xpi  |  gtr  |   ec   |  xpi  |  hip  |   ec   |  mtr
-------------------------------------------------------------------------------
                  IP4 |      |       |        |       |       |        |
                  IP5 |      |       |        |       |       |        |
                  IP6 |      |       |        |       |       |        |
                  IP7 |      |       |        |       |       |        |
                  IP9 |      |       |        |       |       |        |
4D/30, 4D/35      IP12|      |       |        |       |       |        |
R3000 Indigo      IP12|  1   |       |    2   |       |       |        |
                  IP17|      |       |        |       |       |        |
                  IP19|      |       |        |   4   |   4   |        |
                  IP20|  1   |       |    2   |       |       |        |
                  IP21|      |       |        |   4   |   4   |        |
Indy              IP22|  1   |  1    |    2   |       |       |        |
CHALLENGE S       IP22|  1   |  1    |    1   |       |       |        |
CHALLENGE M       IP22|  2   |       |        |       |       |    1   |   1
Indigo2           IP22|  1   |       |        |       |       |    1   |   1
Power Indigo2     IP26|  1   |       |        |       |       |    1   |
Power CHALLENGE M IP26|  2   |       |        |       |       |    1   |


Table 1. Maximum Number of Network Interfaces

	* There are two interfaces per FDDI board

References

The system Owner's Guide contains information on the network interface options available. These guides are available on-line with InSight.

IRIX Admin: Networking and Mail Manual, available on-line with InSight.